home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / windows / wbt31a.zip / RUNPARM.WB$ < prev    next >
Text File  |  1991-12-18  |  858b  |  15 lines

  1. ; Generic Macro with parameters using textbox
  2.  
  3. DirChange(DirHome())                              ;Change to Home directory
  4. RunMe=TextBox("Select Macro/Batch","RunParm.WLS") ;Display RunParm.WLS file
  5. RunMe=StrTrim(RunMe)                              ;Kill leading/trailing blanks
  6. if RunMe=="" then exit                            ;If no selection, exit
  7. a=StrIndex(RunMe," ",1,@FWDSCAN)                  ;Find first space
  8. RunParm=""                                        ;Initialize var to null 
  9. if a==0 then goto GOGO                            ;If no spaces, just do it
  10. RunParm=StrSub(RunMe,a+1,strlen(RunMe)-a)         ;Peel off parms
  11. RunMe=StrSub(RunMe,1,a-1)                         ;Peel off macro/batch file
  12. :GOGO
  13. call(RunMe,RunParm)                               ;and Call it...
  14. Exit                                              ;Byebye
  15.